You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
392 B
Haskell
20 lines
392 B
Haskell
2 years ago
|
{-# language GADTs #-}
|
||
|
module AOC.Types (
|
||
|
Solution (..),
|
||
|
Submission (..)
|
||
|
) where
|
||
|
|
||
|
import Data.Text (Text)
|
||
|
import GHC.Generics (Generic)
|
||
|
import Web.Internal.FormUrlEncoded (ToForm)
|
||
|
|
||
|
data Solution where
|
||
|
Solution :: Show b => (Text -> a) -> (a -> b) -> (a -> b) -> Solution
|
||
|
|
||
|
data Submission = Submission {
|
||
|
part :: Int,
|
||
|
answer :: String
|
||
|
} deriving (Generic)
|
||
|
|
||
|
instance ToForm Submission
|