What is an appropriate type for smart contracts?

I’m wondering what is the best way to express smart contracts in typed languages such as Haskell or Idris (so you could, for example, compile it to run on the Ethereum network). My main concern is: what is the type that captures everything that a contract could do? Naive solution: EthIO A naive solution would … Read more

Are there pronounceable names for common Haskell operators? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Closed 4 years ago. Locked. This question and its answers are locked because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions. I’m reading Learn You a Haskell for Great Good, and I never know how … Read more

When is -XAllowAmbiguousTypes appropriate?

I’ve recently posted a question about syntactic-2.0 regarding the definition of share. I’ve had this working in GHC 7.6: {-# LANGUAGE GADTs, TypeOperators, FlexibleContexts #-} import Data.Syntactic import Data.Syntactic.Sugar.BindingT data Let a where Let :: Let (a :-> (a -> b) :-> Full b) share :: (Let :<: sup, sup ~ Domain b, sup ~ … Read more

Comparing Haskell’s Snap and Yesod web frameworks

The two Haskell web frameworks in the news recently are Yesod (at 0.8) and Snap (at 0.4). It’s quite obvious that Yesod currently supports a lot more features than Snap. However, I can’t stand the syntax Yesod uses for its HTML, CSS and Javascript. So, I’d like to understand what I’d be missing if I … Read more

Haskell: Lists, Arrays, Vectors, Sequences

I’m learning Haskell and read a couple of articles regarding performance differences of Haskell lists and (insert your language)’s arrays. Being a learner I obviously just use lists without even thinking about performance difference. I recently started investigating and found numerous data structure libraries available in Haskell. Can someone please explain the difference between Lists, … Read more

Getting associated type synonyms with template Haskell

Can Template Haskell find out the names and/or the declarations of the associated type synonyms declared in a type class? I expected reify would do what I want, but it doesn’t seem to provide all the necessary information. It works for getting function type signatures: % ghci GHCi, version 7.8.3: http://www.haskell.org/ghc/ 😕 for help … … Read more