3 ms·
The file linked is not what the 'simple Haskell' philosophy suggests. It is compiled with the following extensions enabled: OverloadedStrings NoImplici
by lalaithion 5y ago
The file linked is not what the 'simple Haskell' philosophy suggests. It is compiled with the following extensions enabled:
OverloadedStrings
NoImplicitPrelude
ImplicitParams
Rank2Types
DisambiguateRecordFields
NamedFieldPuns
DuplicateRecordFields
OverloadedLabels
FlexibleContexts
TypeSynonymInstances
FlexibleInstances
QuasiQuotes
TypeFamilies
PackageImports
ScopedTypeVariables
RecordWildCards
TypeApplications
DataKinds
InstanceSigs
DeriveGeneric
MultiParamTypeClasses
TypeOperators
DeriveDataTypeable
MultiWayIf
UndecidableInstances
BlockArguments
PartialTypeSignatures
LambdaCase
DefaultSignatures
EmptyDataDeriving
BangPatterns
BlockArguments
MultiWayIf
FunctionalDependencies
PartialTypeSignatures
StandaloneDeriving
DerivingVia
- rgoulter 5y agoMost of those feature in this list of recommended defaults https://github.com/commercialhaskell/rio#language-extensions https://github.com/commercialhaskell/rio#language-extensions which is cited as an example in simplehaskell's page on recommendations. https://www.simplehaskell.org/language-extensions.html https://www.simplehaskell.org/language-extensions.html From what I've touched of Haskell, I'd think e.g. OverloadedStrings makes Haskell simpler to use than leaving it out. (And OverloadedStrings certianly doesn't seem ego-inducing). Simple Haskell's page on extensions also isn't advocating for anything too concrete. Just an emphasis on pragmatic, simple to maintain code. IHP's landing page even claims "Don't worry, you don't need to know much about Haskell to get started, you'll learn it along the way". This seems to be in the spirit of simple Haskell, although I'd be curious to hear about what parts seem not-simple.
- dwohnitmok 5y agoThe extensions that aren't on that list but are in the list provided by lalaithion are pretty "big" extensions that can severely increase the bar needed to understand Haskell code (I'm looking at ImplicitParams, QuasiQuotes, DataKinds, TypeOperators, and UndeciableInstances). In general, I've only read over IHP code, but never used it myself, I'd be worried about the quality of GHC error messages for a Haskell novice with the amount of magic IHP is providing. There's some nifty type-level programming going on in the background with IHP which works great when everything compiles, but can have confusing GHC error messages if you have an error.